//
//  HMMeTableViewController.swift
//  Weibo
//
//  Created by Apple on 2017/6/3.
//  Copyright © 2017年 KY. All rights reserved.
//

import UIKit

class HMMeTableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

//        setupNavUI()
        addPushButton()
    }
    
    //  添加push按钮
    private func addPushButton() {
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Push", target: self, action: #selector(pushAction))
    }
    
    //  MARK:   -- PushAction
    @objc private func pushAction() {
        let testVc = HMTestViewController()
        navigationController?.pushViewController(testVc, animated: true)
    }
    
    
    private func setupNavUI() {
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", target: self, action: #selector(registerButtonAction))
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", target: self, action: #selector(loginButtonAction))
    }
    
    //  MARK:   --登录和注册按钮的点击事件
    @objc private func registerButtonAction() {
        print("注册")
    }
    
    @objc private func loginButtonAction() {
        print("登录")
    }

}
